import 'package:json_annotation/json_annotation.dart';

part 'country_code.g.dart';

@JsonSerializable()
class CountryCode {
  final int code;
  final String country;
  final String? ico3166;
  final int mobile_length;

  CountryCode({
    required this.code,
    required this.country,
    this.ico3166,
    required this.mobile_length,
  });

  factory CountryCode.fromJson(Map<String, dynamic> json) =>
      _$CountryCodeFromJson(json);

  Map<String, dynamic> toJson() => _$CountryCodeToJson(this);
}
